import http from '@/utils/http'


// 获取题目列表
export function getQuestionListApi() {
    return http({
      url: 'question/list',
      method: 'get',
    })
  }
  //根据id获取题目详情
  export function getQuestionByIdApi(id) {
    return http({
      url: `question/info/${id}`,
      method: 'get',
    })
  }
  //新增题目
  export function addQuestionApi(data) {
    return http({
      url: 'question/save',
      method: 'post',
      data:data
    })
  }

    //修改题目
    export function updateQuestionApi(data) {
        return http({
          url: 'question/update',
          method: 'put',
          data:data
        })
      }
      //删除题目
      export function deleteQuestionApi(id) {
        return http({
          url: `question/delete/${id}`,
          method: 'delete',
        })
      }